interface IPerson {
  id: String;
  age: number;
}

interface IWorker {
  companyId: string;
}

type IStaff = IPerson & IWorker;

// 交叉类型，就是继承两个类型的所有属性
const staff: IStaff = {
  id: 'E1006',
  age: 33,
  companyId: 'EFT'
}

console.dir(staff);